package org.misty.blog.service;


import org.misty.blog.po.Tag;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;
import java.util.Optional;

public interface TagService {
    Tag saveTag(Tag category);

    Optional<Tag> getTag(Long id);

    Optional<Tag> getTagByName(String name);

    Page<Tag> listTags(Pageable pageable);

    List<Tag> listTags();

    List<Tag> listTags(List<Long> ids);

    List<Tag> listTop(int n);

    Tag updateTag(Long id, Tag category);

    void removeTag(Long id);
}
